package cn.yzstu.hell;

import cn.yzstu.first.VerticleExample;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;

/**
 * @author Baldwin
 */
public class HellVertical extends AbstractVerticle {

    public static void main(String[] args) {
        VertxOptions vertxOptions = new VertxOptions();
        vertxOptions.setWorkerPoolSize(32);
        vertxOptions.setEventLoopPoolSize(16);
        Vertx vertx = Vertx.vertx(vertxOptions);
        vertx.deployVerticle(HellVertical.class.getName());
    }

    @Override
    public void start() throws Exception {
        vertx.setPeriodic(1000, id -> System.out.println("Hello World!!!"));
    }
}
